<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/web/header.jsp"%>
<title>个人信息</title>
</head>
<body>
<%@ include file="/web/front/title/start.jsp"%>

<div class="grzxbj">
		<div class="selfinfo center">
		<div class="lfnav fl">
			<div class="ddzx">订单中心</div>
			<div class="subddzx">
				<ul>
					<li><a href="./order.jsp" >我的订单</a></li>
				</ul>
			</div>
			<div class="ddzx">个人中心</div>
			<div class="subddzx">
				<ul>
					<li><a href="./selfinfo.jsp" style="color:#ff6700;font-weight:bold;">我的个人中心</a></li>
					<li><a href="./myaddress.jsp">我的收货地址</a></li>
				</ul>
			</div>
		</div>
		<div class="rtcont fr">
			<div class="grzlbt ml40">我的资料</div>
			<div class="subgrzl ml40"><span>昵称</span><span>${user.name}</span><span><a href="">编辑</a></span></div>
			<div class="subgrzl ml40"><span>手机号</span><span id='tel'>**********</span><span><a href="">编辑</a></span></div>
			<div class="subgrzl ml40"><span>个性签名</span><span>有理想在的地方，地狱就是天堂！</span><span><a href="">编辑</a></span></div>
			<div class="subgrzl ml40"><span>我的爱好</span><span>游戏，音乐</span><span><a href="">编辑</a></span></div> 
			<div class="subgrzl ml40"><span>收货地址</span><span id='addr'>**省**市**区****</span><span><a href="">编辑</a></span></div>
		</div>
		<div class="clear"></div>
		</div>
	</div>
<!-- self_info -->
		<%@ include file="/web/front/title/end.jsp"%>
		
	</body>
	
	<script type="text/javascript">
	
	init();
	
	function refresh(){
		toJsp('/web/front/selfinfo.jsp')
	}
	
	function init(){
		var userCode = '${user.code}'
		console.log(userCode)
		ajax({userCode:userCode},'/address/get.do','json',function(data){
			var addr = data.addr1Name+"-"+data.addr2Name+"-"+data.addr3Name+"-"+data.addr4;
			$('#tel').html(data.tel);
			$('#addr').html(addr);
		})
	}
	</script>

</html>